Welcome to the CHICKEN Scheme pasting service

no title pasted by anonymous on Wed Oct 25 21:27:45 2017

  (define (find searchf iterstate arr result)
    (define temp (searchf iterstate arr))
    
    (define nextresult (first temp)); search result
    (define nextiterstate (second temp)); iteration state
    
    ;(cons nextresult result)
    ; so then where do we (find searchf newstate arr ) ...like this?:
    (find searchf nextiterstate arr (cons nextresult result))
    )

no title added by anonymous on Wed Oct 25 21:32:38 2017

(define (find searchf iterstate arr acc)
    (define temp (searchf iterstate arr))
    
    (define result (first temp)); search result
    (define iterstate (second temp)); next iteration state
    (if (null? result)
        (acc)
        (find searchf nextiterstate arr (cons nextresult acc))) )

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `string-intersperse'?
Visually impaired? Let me spell it for you (wav file) download WAV