Using foldr to append two lists together (Haskell)
- by Luke Murphy
I have been given the following question as part of a college assignment. Due to the module being very short, we are using only a subset of Haskell, without any of the syntactic sugar or idiomatic shortcuts....I must write:
append xs ys : The list formed by joining the lists xs and ys, in that order
append (5:8:3:[]) (4:7:[]) => 5:8:3:4:7:[]
…