Re:How do I modify a variable in Haskell?
by tome on Tuesday August 15, 2017 @11:47AM
(#15019294)
FWIW. (Haskell doesn't have a convenient built-in function for printing arrays. Guilty as charged!)
[ Parent
| on HN ]
Re:How do I modify a variable in Haskell?
by Ajedi32 on Tuesday August 15, 2017 @12:02PM
(#15019419)
Thanks, that looks much nicer and more in-line with what I'd expect from an example intended to demonstrate how easy a simple task is in a specific language.
As an aside, Ruby doesn't have a built-in function for printing arrays either (unless you count .inspect or .to_s, which let you print _anything_). The code I gave formatted the array as a string using some simple data manipulation functions before printing it; it was intended to match the output of the program you provided.