Are you looking for the values function? 

https://docs.racket-lang.org/reference/values.html?q=values#%28def._%28%28quote._~23~25kernel%29._values%29%29

In your example you'd end EnumTriplet with this:

(values x y z)


-- Jonathan

On Friday, January 18, 2019 at 8:49:30 AM UTC-5, Alain Bertrand wrote:
>
> Hi all, 
>
> I am an absolute beginner in Racket. 
> I wrote the following function which deals with Cantor pairing function. 
>
> (define (EnumTriplet n) 
>   (define inter (Enum n)) 
>   (define z (fst inter)) 
>   (define result (Enum (snd inter))) 
>   (define x (fst result)) 
>   (define y (snd result)) 
>   x 
>   ;;y 
>   ;;z 
>   ) 
>
> (EnumTriplet 5259 ) should output  5 8 6 
> How can I modify EnumTriplet so that I got this output ? 
>
> Thanks for your help. 
>
> 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