>>107115634
javascript's syntax is not very good at functional programming. i'm not sure why people push it there.
type int_or_list =
| Int of int
| Lst of int list
let steamrollList lst =
List.concat (List.map (function
| Int x -> [x]
| Lst xs -> xs
) lst)
>That only works on a list of integers
Fine, here's an erlang one
Comment too long. Click here to view the full text.