euler/012.bruijn

Problem description

# TODO: Find faster algorithm

:import std/Combinator .
:import std/Math .

factors [[y [[[(1 <? 3) (2 ++1 (0 + (=?(4 % 1) (+2) (+0)))) 0]]] (+1) (+0)] ++(sqrt 0)]

solve [y [[[(factors 1) >? 3 1 (2 (1 + 0) ++0)]]] (+0) (+0)]

:test ((solve (+5)) =? (+28)) ([[1]])

main [solve (+500)]