以åã®è¨äºã§ç大ã«ãã¤ãªã³ã°ããsliceãç¨ããcdrã¢ããã ã¨ãããããã³ã¤ããã£ã¨ããã¢ãªæ¹æ³ãããã¾ããã carã¯take(1)ããããã¯firstãcdrã¯drop(1)ã§ä»£ç¨ã§ãã¦ãã¾ãã¾ãã > ary = (1..10).to_a #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > ary #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > ary.drop(1) #=> [2, 3, 4, 5, 6, 7, 8, 9, 10] > ary.take(1) #=> [1] > ary.first #=> 1 > ary #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ã±ã£ã¨è¦ã§ããããäºããããã¾ãã ãã®ä¸ãã©ã¡ããéç ´å£ãªã³ãªã¼ãªã®ã§ã以åããcarãcdrã¨è¿ããªãã¾ããã takeã¨firs
id:ayato_pããã®Underscore.jsãã¡ãã£ã¨ä¾¿å©ã ã£ãã®ã§ç´¹ä»ãã¦ã¿ãããèªãã§æã£ãã®ããUnderscore.jsã£ã¦æè¿ä½¿ã£ã¦ããªããªãã¨ãããã¨ã§ããã ã¨ããã®ãã1å¹´ãããåã¾ã§ã¯ãUnderscore + Backboneã§ç´ ã®Javascriptãæ¸ãã¦ããã®ã§ãããæè¿ã¯ClojureScriptãæ¸ãããã«ãªã£ãããã§ãã ã¯ããã« ClojureScriptã§ã¯Javascriptã®ãªãã¸ã§ã¯ãã¯ç´æ¥ã¯ä½¿ãã¾ããã Javascriptã§ã³ã¬ã¯ã·ã§ã³ã¨ããã¨Arrayã«ãªãã¾ãããClojureScriptã§ã¯Sequence,Vector,ListãããJavascriptã®Arrayã¨ã¯å¥ç©ã§ãã ãªãã©ã«ã§ã[1,2,3]ã¨æ¸ãã¨Vectorã表ããã¨ã«ãªãã¾ããããã¦","ã¯ç©ºç½ã¨ç価ãªã®ã§[1 2 3]ã¨è¡¨ç¾åºæ¥ã¾ãã ãã¦ãClojure
åé¡ viã§ãè¤æ°ã®ãã¡ã¤ã«ãéãã¦ç·¨éãããã ã¿ãæ¹å¼ã®ããã¹ãã¨ãã£ã¿ã¿ãããªæãã§ï¼ çã viã³ãã³ãã®å¼æ°ã«ãã¡ã¤ã«åãè¤æ°æ¸¡ãã¦ãè¤æ°ãã¡ã¤ã«ãéããã¨ãã§ããã $ vi a.txt b.txt c.txt $ vi *.txt viãèµ·åããã¨ããããè¤æ°ãã¡ã¤ã«ãéããç¶æ ã«ãããã¨ãã¯ã:argsã³ãã³ãã使ãã :args b.txt c.txt :args *.txt éãã¨ãã±ã£ã¨è¦ã¯åä¸ãã¡ã¤ã«ãéããã¨ãã¨å¤ãããªããããã¡ã¤ã«åãæ¿ãã®ã³ãã³ãã§ãã¡ã¤ã«ãåãæ¿ãããããè¤æ°ãã¡ã¤ã«ã®åãæ¿ã㯠次㸠â :n, å㸠â :prev ãªã©ã®ã³ãã³ãã§ãããªãã ãã¡ã¤ã«ãåãæ¿ãã¦ãã³ãã¼ï¼ã¤ã³ã¯ï¼ãã¦ãå¥ã®ãã¡ã¤ã«ã«åãæ¿ãã¦è²¼ãä»ããªã©ã®æä½ãã§ããã ãã¡ã¤ã«ãåãæ¿ããã¨ããä¿åãã¦ããªãã¨è¦åãããã®ã§ãè¤æ°ä¸¦ã¹ã¦ç·¨éä¸ã«ãããã¨ã㯠:vsã³
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}