S SmartDocs
Chuỗi bài: haskell haskell 4 dòng · Cập nhật 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

Bài viết liên quan