from Hacker News

Reflections on Haskell and Rust

by runeks on 7/4/25, 10:51 AM with 2 comments

  • by runeks on 7/4/25, 10:53 AM

    Regarding the shadowing example, you probably wouldn't write

      config <- loadConfig
      config' <- validateConfig config
      config'' <- mergeDefaults config'
    
    in Haskell but rather

      config <- mergeDefaults =<< validateConfig =<< loadConfig