Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional equations via the library #14

Open
SuprDewd opened this issue Jan 18, 2017 · 2 comments
Open

Functional equations via the library #14

SuprDewd opened this issue Jan 18, 2017 · 2 comments

Comments

@SuprDewd
Copy link
Contributor

Currently it only seems to be possible to specify functional equations via the command line. It would be nice if this was available through the library, without resorting to parsing a hops program.

@akc
Copy link
Owner

akc commented Jan 18, 2017

This can already be done. Maybe not the prettiest, but here are the Fibonacci numbers:

> evalCorePrg (emptyEnv :: Env 5) [Let "f" (1 + (X+X^2)*Var "f")]
series (Proxy :: Proxy 5) [Val (1 % 1),Val (1 % 1),Val (2 % 1),Val (3 % 1),Val (5 % 1)]

@SuprDewd
Copy link
Contributor Author

That's great, but a simpler way would be preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants