From d1708ba538008ed8f20ae761caae935a08ba5d2c Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Sat, 16 May 2026 21:33:02 +1000 Subject: [PATCH] lap-leaderboard: note that `times` lives in `math` disable test runner [no important files changed] --- config.json | 4 ++-- .../concept/lap-leaderboard/.docs/introduction.md | 12 +++++++----- .../role-playing-game/role-playing-game.factor | 3 --- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/config.json b/config.json index 12e93b7b..addc0124 100644 --- a/config.json +++ b/config.json @@ -4,7 +4,7 @@ "active": false, "status": { "concept_exercises": true, - "test_runner": true, + "test_runner": false, "representer": false, "analyzer": false }, @@ -281,7 +281,7 @@ "prerequisites": [ "conditionals", "numbers", - "combinators", + "mutation", "curry-compose-fry" ], "status": "beta" diff --git a/exercises/concept/lap-leaderboard/.docs/introduction.md b/exercises/concept/lap-leaderboard/.docs/introduction.md index 788e2072..4c140603 100644 --- a/exercises/concept/lap-leaderboard/.docs/introduction.md +++ b/exercises/concept/lap-leaderboard/.docs/introduction.md @@ -37,15 +37,16 @@ into a new sequence of the same kind as the input. ## `times` — counted iteration +`times` (in [`math`][math]) runs its quotation `n` times. + ``` times ( n quot: ( -- ) -- ) ``` -`times` runs its quotation `n` times. The published `( -- )` -shape is the *minimum* — because `times` is `inline`, an -effect-balanced quotation like `( str -- str )` works fine, and -the stack is threaded across iterations. That gives you a -counted accumulator without any mutable state: +The published `( -- )` shape is the *minimum* — because `times` +is `inline`, an effect-balanced quotation like `( str -- str )` +works fine, and the stack is threaded across iterations. That +gives you a counted accumulator without any mutable state: ```factor USING: kernel sequences ; @@ -58,4 +59,5 @@ and leaves the new string on the stack for the next iteration. The same trick works for `each-index` and `map-index` when you want to thread an accumulator through. +[math]: https://docs.factorcode.org/content/vocab-math.html [sequences]: https://docs.factorcode.org/content/vocab-sequences.html diff --git a/exercises/concept/role-playing-game/role-playing-game/role-playing-game.factor b/exercises/concept/role-playing-game/role-playing-game/role-playing-game.factor index a33491f6..4daf2ba0 100644 --- a/exercises/concept/role-playing-game/role-playing-game/role-playing-game.factor +++ b/exercises/concept/role-playing-game/role-playing-game/role-playing-game.factor @@ -1,9 +1,6 @@ USING: kernel ; IN: role-playing-game -! TASK 1: Define the player tuple with slots -! name (default f), level (default 0), -! health (default 100), mana (default f). TUPLE: player ; : introduce ( player -- string )