Help with a little function called "choose"

From: Matthew Naylor <mattfn_at_gmail.com>
Date: Mon, 12 Jun 2006 20:02:37 +0100

Dear Curry enthusiasts,

I have two variables, one of which may never be instantiated, and I
would like to know which becomes instantiated first. This function
might look something like

  choose :: () -> () -> Int
  choose () _ = 0
  choose _ () = 1

And if my understanding is correct, a "choose eval choice" annotation
is what I want. But neither PAKCS or MCC support committed choice.

Can "choose" be easily implemented as an external function in either
PAKCS or MCC?

I have written one useful external function for PAKCS (a generic
mapAccum), but defining "choose" is a little beyond my expertise!

Hints much appreciated!

Thanks,

Matt.

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Jun 13 2006 - 08:50:35 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:08 CEST