Hello all,

I am a beginner in Racket.
I need to define a variable pairValue as the result of Enum(result)
The following function
;; Fonction inverse en dimension variable
(define (EnumVarDim dim value result)
  (if ( >= dim 2)
  ( (define pairValue Enum(result)))
    (result)))

 fails with
 "define: not allowed in an expression context in: (define pairValue
Enum (result))"
I don't understand why.

I have also tried to suppress the define :
;; Fonction inverse en dimension variable
(define (EnumVarDim dim value result)
  (if ( >= dim 2)
  ( (pairValue Enum(result)))
    (result)))

fails with " pairValue: unbound identifier in module in: pairValue"
which a message that I do understood and support ;)

What should I do ?

TIA

Alain

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to