> --- I'd rather write
> ---   subset?(s, t)   == #s < #t and every?(x +-> member?(x, t), parts s)
> --- but the compiler complains
> -   subset?(s, t)   ==
> -       #s >= #t => false
> -       every?(mem?, parts s) where
> -           mem?(x: S): Boolean == member?(x, t)
> +   subset?(s, t)   == #s <= #t and s = intersect(s,t)

Were you saying that anonymous functions do not work inside a function body?

>      member?(n, t) ==
>        t case empty => false
> -      n = value t or any?(mem?, children t) where
> -          mem?(c: %): Boolean == member?(n, c)
> +      mem?: % -> Boolean := member?(n, #1)
> +      n = value t or any?(mem?, children t)

I don't know why, but I really hate the #1 notation. If you just take 
the right hand side

   member?(n, #1)

what type must #1 have. One can only figure that out (as in your case) 
if one looks at the left hand side.

The #1 notation looks like a nice shorthand for untyped lamda calculus, 
but don't we have typed lamda calculus in SPAD?

Ralf

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to