Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/halogenandtoast/mochi--
Mochi in c++
https://github.com/halogenandtoast/mochi--
Last synced: 3 months ago
JSON representation
Mochi in c++
- Host: GitHub
- URL: https://github.com/halogenandtoast/mochi--
- Owner: halogenandtoast
- Created: 2013-01-24T17:04:48.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-24T17:25:43.000Z (almost 12 years ago)
- Last Synced: 2024-04-15T14:20:09.350Z (9 months ago)
- Language: C++
- Size: 125 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mochi
The programming language
## Examples
```
Deck (name)
+ init
@cards: []+ add_card card
@cards << card+ play
cards.each -> card
play card- private_method
out "Woot"Card (front back)
+ play
out @front
guess: in.chomp
if @back == guess
out "Correct"
else
out "Incorrect. The answer was #{@back}deck: Deck name: "Japanese" # indenting after a variable creates a scope
add_card Card front "Cat" back "猫"
add_card Card front "Dog" back "犬"
playdeck.play # send a message
+ play thing
out "woot"play deck
+ fib n
if n == 0 || n == 1, n
else, (fib n - 1) + (fib n - 2)fib 5
```