On Tue, Dec 15, 2015 at 03:44:34PM +0100, Michael Hanus wrote:
[...]
> Hence, the challenge is open...
This is my last resort:
fibmatch (tail (tail xs)) = xs
fib | head xs =:= 1
& head (tail xs) =:= 1 = xs
where
xs = fibmatch (zipWith (+) xs (tail xs))
No non-linear patterns. No (=:<=). And no constructors.
But unfortunately it features too much cyclicity which I had liked to avoid.
Think it's time now for a principled retreat.
Best regards
Sebastian
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Dez 21 2015 - 17:47:35 CET