Welcome to the CHICKEN Scheme pasting service

two-values.scm added by gahr on Wed May 29 09:19:07 2024

(import (scheme) (chicken foreign))

(define two-values
  (foreign-primitive ()
    "
    C_word v1 = 12;
    C_word v2 = 13;
    C_word av[4] = { C_SCHEME_UNDEFINED, C_k, v1, v2 };
    C_values(4, av);
    "))

(let-values (((v1 v2) (two-values)))
  (print "v1: " v1 ", v2: "  v2))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the R5RS procedure to access the second element of a pair?
Visually impaired? Let me spell it for you (wav file) download WAV