}
"When a sequence may not have enough elements:"
{ $example "USING: sequences prettyprint ;"
- "{ 1 2 } 5 bound head ."
+ "{ 1 2 } 5 index-or-length head ."
"{ 1 2 }"
}
}
}
"When a sequence may not have enough elements:"
{ $example "USING: sequences prettyprint ;"
- "{ 1 2 } 5 bound tail ."
+ "{ 1 2 } 5 index-or-length tail ."
"{ }"
}
}
}
"When a sequence may not have enough elements:"
{ $example "USING: sequences prettyprint ;"
- "{ 1 2 } 5 bound head* ."
+ "{ 1 2 } 5 index-or-length head* ."
"{ }"
}
}
}
"When a sequence may not have enough elements:"
{ $example "USING: sequences prettyprint ;"
- "{ 1 2 } 5 bound tail* ."
+ "{ 1 2 } 5 index-or-length tail* ."
"{ 1 2 }"
}
}
{ "seq" sequence } { "n" integer } { "n'" integer } }
{ $description "Returns the input sequence and its length or " { $snippet "n" } ", whichever is less." }
{ $examples { $example "USING: sequences kernel prettyprint ;"
- "\"abcd\" 3 bound [ . ] bi@"
+ "\"abcd\" 3 index-or-length [ . ] bi@"
"\"abcd\"\n3"
} } ;