Paste: k
Author: | k |
Mode: | factor |
Date: | Tue, 1 Nov 2011 18:42:29 |
Plain Text |
USING: math.ranges io.encodings.utf8 xml concurrency.combinators ;
10 [1,b] [ 2 * ] map
1000 [1,b] sum
: word-list ( -- seq ) { "Factor" "Concatenative" "Point-free" } ;
: tweet ( -- str ) "This is an example tweet that talks about Factor." ;
word-list [ tweet subseq? ] any?
"F:/data.txt" utf8 file-contents
"F:/data.txt" utf8 file-lines
4 [1,b] [ "Happy birthday " swap 3 = "dear Pradnya!" "to you!" ? append ] map [ . ] each
"Happy birthday " 4 [ 2 = "dear Pradnya!" "to you!" ? append . ] with each-integer
{ 49 58 76 82 88 90 } [ 60 < ] partition
"http://search.twitter.com/search.atom?&q=factor" <pull-xml>
{ 14 35 -7 46 98 } infimum
{ 14 35 -7 46 98 } supremum
data-list [ process-item ] parallel-map
New Annotation