mirror of
https://github.com/dragonheim/gagent.git
synced 2025-05-24 16:56:48 -07:00
Adding support for a genesis DB.
This commit is contained in:
parent
d5fcd11592
commit
7a9225ce86
7 changed files with 35 additions and 4 deletions
13
assets/examples/agents/fib.tcl
Normal file
13
assets/examples/agents/fib.tcl
Normal file
|
@ -0,0 +1,13 @@
|
|||
##########################################
|
||||
### Perform Fibanaci sequence up to 10 ###
|
||||
##########################################
|
||||
set GHINT [split "math, fib" ,]
|
||||
proc fib {x} {
|
||||
if {<= $x 1} {
|
||||
return 1
|
||||
} else {
|
||||
+ [fib [- $x 1]] [fib [- $x 2]]
|
||||
}
|
||||
}
|
||||
|
||||
puts [fib 20]
|
Loading…
Add table
Add a link
Reference in a new issue