This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require (for-syntax racket/base) | |
syntax/parse/define) | |
(let () | |
(define-syntax-parse-rule (define-sum S) | |
(define (S n) | |
(if (= n 0) 0 (+ n (S (- n 1)))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require racket/match) | |
(provide current-solver-path | |
call-with-solver | |
solve) | |
(define current-solver-path (make-parameter (find-executable-path "z3"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
main = putStrLn "Hello, World!" | |
data Void | |
data Cont r a = Cont ((a -> r) -> r) | |
unCont (Cont m) = m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require (for-syntax racket/base | |
racket/syntax | |
syntax/parse)) | |
(define-syntax (define-constant stx) | |
(syntax-parse stx | |
[(_ name:id | |
(~optional (~and #:evaluate evaluate-kw)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang pollen | |
◊(define lam "\\lambda") | |
$◊lam x . \, ◊mathit{function \, body}$ | |
◊textnormal{◊textbf unapplied text command} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang pollen | |
◊(define lam "\\lambda") | |
$◊lam_k\\nabla g_k(x)$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require racket/generator | |
racket/stream | |
racket/sequence) | |
(define (make-iter-gen xs ys) | |
(generator | |
() | |
(for ([x (in-list xs)]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Exporting free identifier table operations that close over a global map | |
#lang racket/base | |
(require racket/list | |
syntax/id-table) | |
(provide env-ref env-has-id? env-add!) | |
(define id-table (make-free-id-table)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require (for-syntax racket/base | |
racket/sequence | |
racket/provide-transform)) | |
(provide (except-out (all-defined-out) | |
(all-in-private-list))) | |
(define-for-syntax private-list '()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require racket/pretty) | |
(require syntax/parse) | |
(module sub racket/base | |
) | |
(require 'sub) |