is it Possible to create a function that will create a set with an input of a list.
I just can’t think of any way without using recursion.
I can use high order functions like fold, filter, map, zip. I just can’t have recursion in my function.
Obviously I can’t use nub.
I’ve been banging my head trying to figure out how to get rid of duplicates without recursion or any type of loop (at least I don’t think we can use loops, gonna ask).
One way to do it:
[1,1,2,3]into[(1,1),(1,2),(2,3)])In code: