Not a functional language, but Prolog is pretty cool.
hanoi(1,FROM,TO,_) :- write('disk from '),
write(FROM),
write(' to '),
write(TO),
nl.
hanoi(N,FROM,TO,X) :- N > 1,
NMIN1 is N - 1,
hanoi(NMIN1,FROM,X,TO),
hanoi(1,FROM,TO,_),
hanoi(NMIN1,X,TO,FROM).
hanoi(N) :- hanoi(N,a,c,b).
Would solve the tower of hanoi problem for any number of disks. You would run it with a command like:
hanoi(3,left,right,center).
And it would print:
disk from left to right
disk from left to center
disk from right to center
disk from left to right
disk from center to left
disk from center to right
disk from left to right
true
Its true power however lies in generation. Like generating a sudoku (live example) in what's technically 3 lines.