#lang racket (define snlist-recur (lambda (flist fatom init) (letrec ([helper (lambda (l) (cond [(null? l) init] [(or (pair? (car l)) (null? (car l))) (flist (helper (car l)) (helper (cdr l)))] [else (fatom (car l) (helper (cdr l)))]))]) helper)))