Re: Confused Students

From: Sebastian Fischer <sebf_at_informatik.uni-kiel.de>
Date: Tue, 19 Jun 2007 18:52:26 +0200

let me add two small observations:

1. Although it looks like eval-time choice would be more intuitive in
this example, this is not the case. The rule

> search g xs | not (x `elem` xs) = search g (x:xs) where x = g (head
> xs) -- no cycles in path

relies on call-time choice. It is essential, that both occurrences of
x -- the one in (x `elem` xs) and the one in search g (x:xs) --
denote the same node of the graph.

2. We could add to the rule

> f (x?y) = f x ? f y

the rule

(f?g) x = f x ? g x

and characterize call-time choice as distributive law between
application and non-deterministic choice.

Sebastian

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Jun 20 2007 - 08:56:24 CEST

This archive was generated by hypermail 2.3.0 : Sa Dez 07 2019 - 07:15:08 CET