Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't it a true functional way?


There are smarter ways to deal with data structures in the functional setting than copying the entire structure over and over again.

See https://en.wikipedia.org/wiki/Purely_functional_data_structu... and Okasaki’s book Purely Functional Data Structures.


I could definitely be wrong but I think most functional data structures aren’t fully copied. Instead, they’ll utilize something like a pointer to the data that stayed the same so only the part that changes is “copied”.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: