|
 |
scott wrote:
>> ([] , _ ) -> Nothing
>
> Yeh, it's really clear what this line does to a non-Haskeller :-)
It's pretty standard notation for functional languages. Erlang uses the same
notation. If you get a two-element tuple with the first element being an
empty list, the result is an arbitrary atomic value (not unlike an "enum")
called "Nothing".
It's no less clear than function calls or array indexes if you've ever used
that operation before in a programming language. It's about as complex as a
case statement.
--
Darren New, San Diego CA, USA (PST)
Human nature dictates that toothpaste tubes spend
much longer being almost empty than almost full.
Post a reply to this message
|
 |