rosetta/prime_decomposition.bruijn

Problem description

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

factors \divs primes
	divs y [[&[[&[[3 ⋅ 3 >? 4 case-1 (=?0 case-2 case-3)]] (quot-rem 2 1)]]]]
		case-1 4 >? (+1) {}4 empty
		case-2 3 : (5 1 (3 : 2))
		case-3 5 4 2

main [factors <$> ({ (+42) → (+50) })]