S SmartDocs
系列: haskell haskell 4 行 · 更新於 2026-02-03

exercise_6.hs

haskell/Week_6_Lab/exercise_6.hs

-- Define the join function
join :: [a] -> [a] -> [a]
join [] ys = ys  -- Base case: if the first list is empty, return the second list
join (x:xs) ys = x : join xs ys  -- Recursively prepend elements of the first list to the second list

相關文章