Skip to content

Commit 69095f0

Browse files
committed
Updates
1 parent 6382c36 commit 69095f0

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

rosetta-code/solutions/autogram-checker.factor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
!
8787
! - Wikipedia: Autogram
8888
!
89+
! =
90+
!
8991
! Category: String manipulation Category:Strings
9092

9193

rosetta-code/solutions/fibonacci-sequence.factor

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
! Category:Recursion Category:Memoization Category:Classic CS problems and
3838
! programs
3939

40-
: fib ( n -- m )
41-
dup 2 < [
42-
[ 0 1 ] dip [ swap [ + ] keep ] times
43-
drop
44-
] unless ;
40+
41+
! produce the nth fib
42+
: fib ( n -- fib ) 1 0 rot [ tuck + ] times drop ; inline
43+
44+
! produce a list of the first n fibs
45+
: fibseq ( n -- fibs ) 1 0 rot [ [ + ] 2keep ] replicate 2nip ; inline
46+

rosetta-code/solutions/long-literals-with-continuations.factor

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
! in column one.
2929
!
3030
! The list may have leading/embedded/trailing blanks during the
31-
! declaration (the actual program statements), this is allow the list to
32-
! be more readable. The "final" list shouldn't have any leading/trailing
33-
! or superfluous blanks (when stored in the program's "memory").
31+
! declaration (the actual program statements), this allows the list to be
32+
! more readable. The "final" list shouldn't have any leading/trailing or
33+
! superfluous blanks (when stored in the program's "memory").
3434
!
3535
! This list should be written with the idea in mind that the program will
36-
! be updated, most likely someone other than the original author, as there
37-
! will be newer (discovered) elements of the periodic table being added
38-
! (possibly in the near future). These future updates should be one of the
39-
! primary concerns in writing these programs and it should be "easy" for
40-
! someone else to add chemical elements to the list (within the computer
41-
! program).
36+
! be updated, most likely by someone other than the original author, as
37+
! there will be newer (discovered) elements of the periodic table being
38+
! added (possibly in the near future). These future updates should be one
39+
! of the primary concerns in writing these programs and it should be
40+
! "easy" for someone else to add chemical elements to the list (within the
41+
! computer program).
4242
!
4343
! Attention should be paid so as to not exceed the clause length of
4444
! continued or specified statements, if there is such a restriction. If

0 commit comments

Comments
 (0)