This file contains hidden or 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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or 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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or 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
| const fetchQuizData = () => | |
| fetch( | |
| `https://opentdb.com/api.php?amount=10&difficulty=hard&type=boolean`, | |
| ).then(response => response.json()) | |
| const normalizeQuizData = (data) => | |
| data.reduce( | |
| (acc, obj) => [ | |
| ...acc, | |
| { |
This file contains hidden or 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
| type progress = | |
| | Stopped | |
| | Playing | |
| | Rewinding | |
| | FastForwarding | |
| | Paused; | |
| type playerState = { | |
| status: progress, | |
| activeTrackIndex: option(int), | |
| }; |
This file contains hidden or 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
| type track = { | |
| name: string, | |
| artist: string, | |
| }; | |
| let tracks = [| | |
| {artist: "Kromestar", name: "007"}, | |
| {artist: "Kromestar", name: "008"}, | |
| {artist: "Kromestar", name: "009"}, | |
| {artist: "Kromestar", name: "010"}, | |
| {artist: "Kromestar", name: "011"}, |
NewerOlder