functional programming - Error with functions inside tuples in Haskell -


i'm playing little haskell , i'm stuck error, using snd function tuple (string, list).

snd ("felix felices",[("escarabajos machacados",52,[f1,f2]),("ojo de tigre sucio",2,[f2])]) error - cannot find "show" function for: *** expression : snd ("felix felices",[("escarabajos machacados",52,[f1,f2]),("ojo de tigre sucio",2,[f2])]) *** of type    : [([char],integer,[(integer,integer,integer) -> (integer,integer,integer)])] 

the thing is, if remove f1, f2 , f3 (they functions) code works fine, returns list. why happening, why can't put function inside tuple's second position?

you can put functions tuples. can't display them - ghci wants show result , print it. how should show (convert string) functions? can't, or @ least nobody felt choosing 1 way of doing (which propably flawed anyway - @ least can't think of approach doesn't have holes huge can see them). therefore, can't evaluate returns functions or collections of functions in ghci.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -