]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/hacker-news/hacker-news.factor
assocs: Add of and ?of. Change all the things at once! Fixes #701.
[factor.git] / extra / hacker-news / hacker-news.factor
index 9472fab23f91e1962ff4fe484539a1c07c24c3ef..e7faaccf38a2779778b1ed1d0c4f046e49b85a08 100644 (file)
@@ -26,7 +26,7 @@ TUPLE: post title postedBy points id url commentCount postedAgo ;
 
 : hacker-news-items ( -- seq )
     "http://api.ihackernews.com/page" http-get nip
-    json> "items" swap at items> ;
+    json> "items" of items> ;
 
 : write-title ( title url -- )
     '[