Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
|
|
@ -0,0 +1,5 @@
|
|||
load("stringproc")$
|
||||
top(s) := substring(s, 2)$
|
||||
tail(s) := substring(s, 1, slength(s))$
|
||||
top_and_tail(s) := substring(s, 2, slength(s))$
|
||||
map(lambda([f], f("xyzzy")), [top, tail, top_and_tail]);
|
||||
4
Task/Substring-Top-and-tail/R/substring-top-and-tail.r
Normal file
4
Task/Substring-Top-and-tail/R/substring-top-and-tail.r
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
top_and_tail <- function(s, top=TRUE, tail=TRUE) substr(s, 1+top, nchar(s)-tail)
|
||||
top_and_tail("xyzzy")
|
||||
top_and_tail("xyzzy", top=FALSE)
|
||||
top_and_tail("xyzzy", tail=FALSE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue