HELP - Circularity

View: New views
2 Messages — Rating Filter:   Alert me  

HELP - Circularity

by Brian1978 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am trying to run this program (sorry about the brackets :)

(((fn z => (fn x => (((z x) x) x)) (fn y => (( two (fn x => (y(x I))))five))) I) I)

where:
fun two f x = f(f x);
fun five f x = f(f(f(f(f x))));
fun I x = x;

I get this error:

operator and operand don't agree [circularity]
  operator domain: ((('Z -> 'Z) -> ('Z -> 'Z) -> 'Z -> 'Z)
                    -> ('Z -> 'Z) -> 'Z -> 'Z)
                   -> ((('Z -> 'Z) -> ('Z -> 'Z) -> 'Z -> 'Z)
                       -> ('Z -> 'Z) -> 'Z -> 'Z)
                      -> ((('Z -> 'Z) -> ('Z -> 'Z) -> 'Z -> 'Z)
                          -> ('Z -> 'Z) -> 'Z -> 'Z)
                         -> 'Y
  operand:         ((('Z -> 'Z) -> ('Z -> 'Z) -> 'Z -> 'Z)
                    -> ('Z -> 'Z) -> 'Z -> 'Z)
                   -> (('Z -> 'Z) -> ('Z -> 'Z) -> 'Z -> 'Z)
                      -> ('Z -> 'Z) -> 'Z -> 'Z
  in expression:
    (fn z => (fn <rule>) (fn <rule>)) I
-------------------------------------------------------
Thank you

Re: HELP - Circularity

by Gergely Buday :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/30 Brian1978 <kamuliboyz@...>:
> I am trying to run this program (sorry about the brackets :)
>
> (((fn z => (fn x => (((z x) x) x)) (fn y => (( two (fn x => (y(x
> I))))five))) I) I)

What is your program supposed to do? Should we know that, we could be
in a better position to help you fixing it.

- Gergely

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Smlnj-list mailing list
Smlnj-list@...
https://lists.sourceforge.net/lists/listinfo/smlnj-list