以åã®è¨äºã§ç大ã«ãã¤ãªã³ã°ãã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
{{#tags}}- {{label}}
{{/tags}}