99 Elm 問題/第 20 個問題
外觀
從列表中移除第 N 個元素。
import Html exposing (text)
import List
removeAt : Int -> List a -> List a
-- your implementation goes here
main = text <| toString <|
removeAt 2 [1..4]
結果
[1, 3, 4]
從列表中移除第 N 個元素。
import Html exposing (text)
import List
removeAt : Int -> List a -> List a
-- your implementation goes here
main = text <| toString <|
removeAt 2 [1..4]
結果
[1, 3, 4]