On Thu, Dec 10, 2015 at 10:53:00PM +0100, Michael Hanus wrote:
> As I wrote before, the second argument of the non-strict unification
> operator (=:<=) must be a pattern variable in order to stay in the
> well-understood framework of functional patterns. Since this is not the
> case in your definition, it might compute something as intended,
> but the general declarative semantics is not clear (to me).
Challenge accepted ;)
fibaux fib xs | (1, (1, tail (tail fib))) =:<= xs = fib
fibs = fibaux xs (head xs, (head (tail xs), zipWith (+) xs (tail xs)))
where xs free
And if non-linearity of patterns isn't an issue...
fibaux fib (1, (1, tail (tail fib))) = fib
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Dez 15 2015 - 15:45:44 CET