builtin-programs/demos.folk
# Setting aside this tag space (45000 to 45050) for Folk Demo Booklet
Claim 45000 has demo code {
Wish $this is labelled "Welcome to Folk! This is a program"
Wish $this is outlined green
}
Claim 45001 has demo code {
Wish $this is labelled "My wishes came true!"
Wish $this is outlined blue
}
Claim 45002 has demo code {
When /actor/ is cool {
Wish $this is labelled "$actor is pretty cool"
Wish $actor is outlined red
}
}
Claim 45003 has demo code {
Claim $this is actor
Claim $this is cool
}
Claim 45004 has demo code {
When the clock time is /t/ {
Wish $this is labelled $t
}
}
Claim 45005 has demo code {
When the clock time is /t/ {
Wish $this draws a circle offset [list expr {sin($t) * 50} 0]
}
}
Claim 45006 has demo code {
Wish $this is outlined blue
When $this points up at /p/ {
Wish $this is labelled "Pointing at $p"
Wish $p is labelled "and I am being pointed at"
}
}
Claim 45007 has demo code {
Wish $this is outlined red
Wish $this is labelled "I am a program"
}
Claim 45008 has demo code {
When $this has camera slice /slice/ {
Wish $this displays camera slice $slice
}
}