june / Deck of Cards
0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 3 weeks ago
Generate a deck of cards.
| 1 | ||:: form a deck :suits: (spades hearts diamonds clubs) |
| 2 | :ranks: (2 3 4 5 6 7 8 9 jack queen king ace) |
| 3 | |
| 4 | |:: form a deck? :suits: $suit| |
| 5 | :: match $suit to a rank |
| 6 | :used suits: $suit |
| 7 | |:: form a deck| |
| 8 | :: reset suits |
| 9 | |
| 10 | |:: match $suit to a rank? :ranks: $rank| |
june / Quad Store w/ Arrays
0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 3 weeks ago
A definition of a quad store, and an example defining arrays.
| 1 | ||:: foo @ 0 = 10 |
| 2 | :: foo @ 1 = 20 |
| 3 | :: foo @ 2 = 30 |
| 4 | :: foo @ 0 |
| 5 | :: foo @ * |
| 6 | |
| 7 | |:: $name @ *? :found: array $name $index $value| |
| 8 | :values: $value |
| 9 | |:: $name @ * :empty:| |
| 10 | |:: $name @ *?| |
capitalex / email-archives.factor
0 вподобань
0 форк(-ів)
1 файл(-ів)
Остання активність 1 month ago
| 1 | ! Copyright (C) 2026 CapitalEx. |
| 2 | ! See https://factorcode.org/license.txt for BSD license. |
| 3 | USING: assocs calendar calendar.format concurrency.combinators |
| 4 | io.encodings.utf8 io.files kernel make math.parser sequences |
| 5 | splitting unicode ; |
| 6 | IN: email-archives |
| 7 | |
| 8 | : post-date ( json -- ymdhms ) |
| 9 | "postDate" of dup [ dec> unix-time>timestamp timestamp>ymdhms ] [ drop "[DATE MISSING]" ] if ; |
Новіше
Пізніше