Re: Curry-on to infinity

From: Sebastian Hanowski <sebastian_hanowski_at_gmx.de>
Date: Mon, 21 Dec 2015 09:15:28 +0100

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

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:12 CET