I am trying to implement a function that checks whether or not a list is empty (similar to List.null).
This has signature val isEmpty = fn: ''a list -> bool:
fun isEmpty ls =
ls = []
This has signature val isEmpty = fn: 'a list -> bool:
fun isEmpty [] = true
| isEmpty _ = false
Why are the signatures different for these two functions although they do the same thing?