Re:Grain: A strongly-typed functional programming language f...
by lodi on Tuesday July 31, 2018 @12:37PM
(#17654620)
They did. The elm-style version is in the standard libraries as:
(http://hackage.haskell.org/package/base-4.11.1.0/docs/Data-M...)
[ Parent
| on HN ]
Re:Grain: A strongly-typed functional programming language f...
by galaxyLogic on Tuesday July 31, 2018 @11:23PM
(#17659405)
That's a lengthy name for the simple operation of getting the first element of a list if there is one. I would have preferred 'car' :-)
Re:Grain: A strongly-typed functional programming language f...
by lodi on Friday August 03, 2018 @11:42AM
(#17680761)
It's a bit verbose, but this kind of thing is far less prevalent in Haskell anyway; most of the time you destructure a list through pattern matching, not explicit head/tail functions.