跳到正文

个人记录

管道

litjohn约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年4月7日
篇幅
约 1 分钟

版本

  1. v1当前
scheme
(define combine
  (lambda (f g)
    (lambda x (g (apply f x)))))

(define tunnel
  (lambda list-of-params
    (let ((x (car list-of-params))
          (tmp (cdr list-of-params)))
      (if (null? tmp)
        x
        (let ((y (car tmp))
              (rest (cdr tmp)))
          (apply tunnel
            (cons
              (combine x y)
              rest)))))))
原文