smallestNum [] s = s
smallestNum (x:xs) s
    | x < s = smallestNum xs x
    | otherwise = smallestNum xs s

main = do
    let lst = [5,4,3,2,1]
    print(smallestNum lst (lst !! 0))
smallestNum [] s = s
smallestNum (x:xs) s
    | x < s = smallestNum xs x
    | otherwise = smallestNum xs s

main = do
    let lst = [5,4,3,2,1]
    print(smallestNum lst (lst !! 0))