Comment

Comment by pilgrim689

This tells you that "map reverse" returned a function that takes a list and returns a list. This function does not have a "Show" instance (analogous to someone failing to implement the "toString()" method for that type), so an error is thrown at you since it cannot possibly output something that doesn't know how to be output. Try just storing it in a variable instead.

> let f = map reverse

> f [[1,2,3], [6,7,8]]

EDIT: scratch the "let" example (thanks nandemo), tryhaskell.org doesn't support that. my bad!

parent pilgrim689 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton