25 lines
615 B
Text
25 lines
615 B
Text
[ 0 swap witheach + ] is sum ( [ --> n )
|
|
|
|
[ 0 ]'[ rot witheach
|
|
[ over do swap dip + ] drop ] is count ( [ --> n )
|
|
|
|
[ [] 4 times
|
|
[ 6 random 1+ join ]
|
|
sort behead drop sum ] is attribute ( --> n )
|
|
|
|
[ [] 6 times
|
|
[ attribute join ] ] is raw ( --> [ )
|
|
|
|
[ dup sum 74 > not iff
|
|
[ drop false ] done
|
|
count [ 14 > ] 1 > ] is valid ( [ --> b )
|
|
|
|
[ raw dup valid if
|
|
done
|
|
drop again ] is stats ( --> [ )
|
|
|
|
randomise
|
|
stats dup echo cr cr
|
|
say 'Sum: ' dup sum echo cr
|
|
say '# of attributes > 14: '
|
|
count [ 14 > ] echo
|