this looks like a very cool project! I tried out some stuff and found that:
[1, 2, 3, 4, 5] | fn@filter ( x -> x == 1 )
prints: cannot add [] and item
while:
fn@filter ( x -> x == 1 ) [1, 2, 3, 4, 5]
works as expected and returns [1]
not sure whats the cause of the difference but I managed to fix it by changing fn@filters implementation
to:
f -> list -> { let result = [];
for item in list { if (f item) { let result = (+ result [item]) } else (None) }; result
}
I've been wanting a more functional shell for a long time and I hope dunesh could turn into this for me, so I'd love to see this fixed, let me know if you need any help 😄.
this looks like a very cool project! I tried out some stuff and found that:
prints:
cannot add [] and item
while:
works as expected and returns [1]
not sure whats the cause of the difference but I managed to fix it by changing
fn@filters
implementationto:
I've been wanting a more functional shell for a long time and I hope dunesh could turn into this for me, so I'd love to see this fixed, let me know if you need any help 😄.