how to write a function from list to a tuple
i have taken the string to a tuple. but i need to send it to a tuple.
can someone help me
how to write a function from list to a tuple
i have taken the string to a tuple. but i need to send it to a tuple.
can someone help me
You can't convert an arbitrarily long list to a tuple because tuples of different lengths are considered as distinct types. But you can have:
listToTuple2 :: [a] -> (a, a)
listToTuple3 :: [a] -> (a, a, a)
listToTuple4 :: [a] -> (a, a, a, a)
listToTuple5 :: [a] -> (a, a, a, a, a)
etc.