probmods / webchurch

A Church to Javascript compiler (DEPRECATED)
Other
140 stars 15 forks source link

`mod` not defined. #62

Closed PrajitR closed 10 years ago

PrajitR commented 10 years ago

In the Patterns of Inference chapter, the Explaining Away section encourages the use of mod (modulus operator). However, mod is undefined:

(mod 6 2) gives the error mod is not defined. modulo also does not work.

PrajitR commented 10 years ago

This seems to be a case of a bigger problem: some of the functions defined in church_builtins.js throw not defined errors. A non-comprehensive check shows mod, sqrt, sort, and unique throw errors. There are probably more functions that are defined but throw undefined errors.

longouyang commented 10 years ago

The version of webchurch that is used on probmods.org is many revisions behind.

mod, sqrt, sort, and unique should work in a local copy of webchurch.

I am working on integrating the latest webchurch into probmods.org, but expect this to take a few weeks