This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That's all for our `poke-noun` arm. But what about when the timer goes off? Behn will create a `gift` a similar construct to how we created an `effect`, only this time it will end up being dispatched back to us by Gall in the `++wake` arm. Gall looks for an arm named `++wake` when a timer goes off; it is defined this way in the vane's code. Gall will actually check for an arm that also contains the wire name, but this will be covered in a later document. So any app that wants to use a timer trigger needs to have an arm called `++wake`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: | |
|% | |
+$ suit ?(%hearts %spades %clubs %diamonds) | |
+$ darc [sut=suit val=@ud] | |
+$ deck (list darc) | |
++ make-deck | |
^- deck | |
=| mydeck=deck | |
=/ i 1 | |
|- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/+ playing-cards | |
:- %say | |
|= [[* eny=@uv *] *] | |
:- %noun | |
(shuffle-deck:playing-cards make-deck:playing-cards eny) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: | |
|% | |
+$ suit ?(%hearts %spades %clubs %diamonds) | |
+$ darc [sut=suit val=@ud] | |
+$ deck (list darc) | |
++ make-deck | |
^- deck | |
=| mydeck=deck | |
=/ i 1 | |
|- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: | |
|% | |
+$ suit ?(%hearts %spades %clubs %diamonds) | |
+$ darc [sut=suit val=@ud] | |
+$ deck (list darc) | |
++ make-deck | |
^- deck | |
=| mydeck=deck | |
=/ i 1 | |
|- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: | |
:- %say | |
|= [* [n=@ud ~] ~] | |
:- %noun | |
=| lis=(list @ud) | |
|- | |
^- (list @ud) | |
?: (lte n 0) | |
lis | |
%= $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!: | |
:- %say | |
|= [* [n=@ud ~] ~] | |
:- %noun | |
^- (list @ud) | |
=+ l=(list @ud) | |
|- | |
?: (gth n 0) | |
=/ d (mod n 10) | |
%= $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am baudtack on github. | |
* I am baudtack (https://keybase.io/baudtack) on keybase. | |
* I have a public key whose fingerprint is ED3F 686A 6C41 2920 7FE5 FA9E E18A 6B54 B44A 26CE | |
To claim this, I am signing this object: |