Welcome to the CHICKEN Scheme pasting service

portable random unsigned int added by dieggsy on Wed Mar 13 20:22:30 2019

(import (only miscmacros repeat)
        (only chicken.blob make-blob)
        (only chicken.random random-bytes pseudo-random-integer)
        srfi-4
        chicken.foreign)

(foreign-declare "#include <limits.h>")

(define (random-long)
  (let ((bytes (random-bytes (make-blob 8))))
    ((foreign-lambda* unsigned-long ((c-pointer l))
       "C_return(*(unsigned long*)l);")
     (location bytes))))

(define (random-long*)
  (pseudo-random-integer (foreign-value "LONG_MAX" long)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Given a list, which one-argument R5RS procedure returns the element at index 0?
Visually impaired? Let me spell it for you (wav file) download WAV