The Sixth Sense, 2.2

Euler problem 5.2 | Folding an infinite list, 2

.

.

f = foldr1 lcm [1..20]

.

.

Most problems on Project Euler can be solved in three ways:

  • with brute-force

  • with an algorithm that solves a more general problem

  • with a smart solution that requires pencil and paper at most

If you’re interested in a nice solution rather than fixing your code, try concentrating on the last approach …

— edited Oct 8, 2016 at 8:57

— huwr

— answered Dec 27, 2011 at 14:33

— Philip

— Stack Overflow

.

.

2022.10.23 Sunday (c) All rights reserved by ACHK