
Hi (First question so be gentle)! Just started to look at Haskell and I was wondering about various versions of calculating factorials. If I have facr 0 = 1 facr n = foldr (*) 1 [1..n] facl 0 = 1 facl n = foldl (*) 1 [1..n] Is there any difference in efficiency, I remember reading it is better to count down than to count up but left to right or right to left :-) Cheers Paul Paul Johnston Humanities Development Team Room 2.12 Bridgeford Street Building Manchester University Tel 0161 275 1396 Mail Paul.Johnston@manchester.ac.uk Web http://web-1.humanities.manchester.ac.uk/prjs/mcasspj/ How to shoot yourself in the foot Unix % ls foot.c foot.h foot.o toe.d toe.o %rm* .o rm:.o no such file or directory