Comments (2)
Not that straightforward because in the following example:
(: a T)
(: foo (-> T T))
(= (foo $x) $x)
(= (bar $x) $x)
!(foo (bar a))
bar
has no type and (bar a)
interpreted as a tuple. As a consequence the type of (bar a)
is (%Undefined% T)
which is not unified with T
required by foo
. Thus relaxed type-checking allows using untyped functions in many examples.
For example recursive fact
definition also fails with tuple type-checking enabled:
(= (fact $n) (if (== $n 0) 1 (* (fact (- $n 1)) $n)))
!(assertEqual (fact 5) 120)
from hyperon-experimental.
We could check alternative interpretations:
- interpret tuple as a function call
- interpret tuple as a tuple
and select ones which don't lead to the error.
from hyperon-experimental.
Related Issues (20)
- parse grounded operation is badly implemented HOT 5
- How to delay reduction until bindings are ready?
- get-doc units tests are slow
- Python package version is determined incorrectly in repository forks as "0.1.devX+Y" HOT 5
- py-atom problem with multiply import HOT 2
- Type checking for the Symbol meta-type doesn't work properly HOT 1
- MeTTa should support single sided matching HOT 14
- !(import! &self lib) is not working for python libraries HOT 7
- Referential transparency on non-deterministic functions
- C interface does not build HOT 6
- Documenting how to use LLM gate and test_assist.metta HOT 2
- pkg_mgmt, Support for git-hosted modules specified with custom revisions &/or tags
- docker build fail HOT 1
- Release is broken: delocate tool finds inconsistencies in packages under macos-13 and macos-14 GitHub action environments HOT 4
- Have assertEqual support alpha equivalence HOT 5
- cargo run --features no_python --bin metta-repl before and after metta-repl HOT 10
- Build problem (no docker) C extension: conan delegating pybind11 build to cmake which conflicts with pyenv. HOT 7
- Linking to libssl, libcrypto and libz breaks manylinux compatibility according to PEP-513 HOT 2
- Documentation is not shows for the operations which are duplicated in Python and Rust stdlib when Python runner is used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperon-experimental.