food-chain: fix (#186)
This commit is contained in:
5
bin/test
5
bin/test
@@ -59,11 +59,6 @@ done
|
||||
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
|
||||
verify_exercise "$practice_exercise_dir" "example"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user