Last active
August 29, 2015 14:11
-
-
Save kos59125/2c888ca037e70afcae6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(magrittr) | |
takewhile <- function(zoi, count=0L) { | |
count <- count + 1L | |
if (eval(zoi)) { | |
return(count) | |
} else { | |
return(takewhile(zoi, count)) | |
} | |
} | |
quote( | |
list(c("今日", "ぞい"), c("も"), c("1", "ぞい"), c("日", "ぞい"), c("がん", "ぞい"), c("ばる", "ぞい"), c("ぞい!")) %>% | |
sapply(sample, size=1L) %>% | |
paste(collapse="") %T>% | |
cat(fill=TRUE) %>% | |
equals("今日も1日がんばるぞい!") | |
) %>% | |
takewhile() %>% | |
cat("がんばるまで", ., "zoi でした", fill=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment