News for hackers. Stuff that matters.
Re:Why it’s hard for programmers to write a program to flatt... by bushin on Friday February 24, 2017 @01:02PM (#13725950)
More precisely List<Integer | List<Integer | List <Integer | List<Integer | ...> :) That would be trivial in functional languages.
Re:Why it’s hard for programmers to write a program to flatt... by dragonwriter on Friday February 24, 2017 @02:00PM (#13726554)
It would be trivial in languages with sum types and support for recursive signatures/constructors, which doesn't describe all statically-types functional languages. And there's no reason such a language would have to be functional, though most are.