We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Loading...
  • Practice
  • Compete
  • Jobs
  • Leaderboard
  • Hiring developers?
  1. Practice
  2. Functional Programming
  3. Introduction
  4. Update List
  5. Discussions

Update List

  • Problem
  • Submissions
  • Leaderboard
  • Discussions

    You are viewing a single comment's thread. Return to all comments →

  • numerocinquo 3 years ago+ 2 comments

    def f(arr:List[Int]):List[Int] = for(i <- arr) yield(i.abs)

    1|
    ParentPermalink
    • patrick_ce 8 months ago+ 0 comments

      My favorite :D Although my first answer was with "if (x<0) ..."

      0|
      ParentPermalink
    • arpit39agarwal 2 weeks ago+ 0 comments

      i tried this but didnt work for me

      0|
      ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature