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

Add program examples for simple things (ie. factorial, Pythagorean theorem) [Suggestion] #60

Open
fionafibration opened this issue Dec 8, 2017 · 1 comment

Comments

@fionafibration
Copy link

I have found Jelly to be a very cool language but I am extremely confused about how to actually write it. With it being a tacit language, it is radically different from most other languages I've seen and because of this it can be very difficult to initially get into. Some examples with explanations would be extremely useful. Such examples that are usually quite helpful are factorials (recursion and looped versions), Pythagorean theorem (Examples of just doing equations), GCD (quite common and also useful in cryptographic cops & robber challenges), and compute digits of Pi (using Euler's problem).

I think such examples would be very useful and would probably help many more people move towards Jelly as their main golfing language. Thanks!

@fionafibration fionafibration changed the title Add examples for simple things (ie. factorial, Pythagorean theorem) Add program examples for simple things (ie. factorial, Pythagorean theorem) [Suggestion] Dec 8, 2017
@Kroppeb
Copy link

Kroppeb commented Aug 7, 2018

Factorial: (monadic) RP (no recursion though)
Pythagoras: (monadic, input as a array) ²S½
Pythagoras: (dyadic, not a lot of experience so this is probably not the shortest) ²+ɓ²µ½
GCD (dyadic) : g (not recursive either)

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