food-chain: fix (#186)

This commit is contained in:
Erik Schierboom
2024-05-15 09:20:58 +02:00
committed by GitHub
parent 709639aec0
commit 6c492fc8ca
2 changed files with 3 additions and 7 deletions

View File

@@ -58,12 +58,7 @@ done
# Verify the Practice Exercises
for practice_exercise_dir in ./exercises/practice/*/; do
if [[ -d $practice_exercise_dir ]]; then
echo "Checking $(basename "${practice_exercise_dir}") exercise..."
# TODO: re-enable once the example solution to food-chain is fixed
if [[ $(basename "${practice_exercise_dir}") == "food-chain" ]]; then
echo "$(basename "${practice_exercise_dir}"): skipped"
continue
fi
echo "Checking $(basename "${practice_exercise_dir}") exercise..."
verify_exercise "$practice_exercise_dir" "example"
fi
done

View File

@@ -42,12 +42,13 @@
: verse \ n -- a
dup a:new
swap verse-start a:+
over 8 n:= if nip ;then
swap verse-middle a:+
verse-end a:push
;
: join-verses \ a -- a
( swap a:len 0 n:= !if "" a:push then swap a:+ ) [] a:reduce
( swap a:len 0 n:= !if "" a:push then swap a:+ ) a:new a:reduce
;
: recite \ n n -- a