您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

29 行
550B

  1. (module util (curry applied thunk just perhaps compose-symbols)
  2. (import scheme)
  3. (import chicken.base)
  4. (import srfi-13)
  5. (define (curry fn a)
  6. (lambda (b)
  7. (fn a b)))
  8. (define (applied fn)
  9. (curry apply fn))
  10. (define-syntax thunk
  11. (syntax-rules ()
  12. ((_ exp ...)
  13. (lambda () exp ...))))
  14. (define (just fn)
  15. (lambda args
  16. (fn)))
  17. (define (perhaps fn arg)
  18. (if arg
  19. (fn arg)
  20. arg))
  21. (define (compose-symbols . ln)
  22. (string->symbol (string-concatenate (intersperse (map symbol->string ln) "-")))))