馅饼语言:手册与现实生活

Pie language: Manual vs Real life

对于新的类模式依赖类型语言 'Pie',我购买了该语言的配套书籍:The Little Typer (http://thelittletyper.com/)

我正在尝试使用 DrRacket 跟随代码,但在输入书中的代码时出现错误。

(cons 'ratatouille 'baguette)

我收到这个错误: "Can't determine a type"

既然两个符号都是原子,那么调用 cons 不应该起作用吗?

此外,'+' 函数未定义,即使对于数字也是如此。 Pie有prelude可以导入提供这么基本的东西吗

尝试

#lang pie
(the (Pair Atom Atom)
  (cons 'foo 'foo))