programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
jackpot@lemmy.mlBanned to Programming · 1 year ago

when is it best to use a recursive function vs a for loop

message-square
message-square
52
link
fedilink
31
message-square

when is it best to use a recursive function vs a for loop

jackpot@lemmy.mlBanned to Programming · 1 year ago
message-square
52
link
fedilink
  • glitches_brew@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    1 year ago

    Elixir does have for loops.

    https://hashrocket.com/blog/posts/elixir-for-loops-go-beyond-comprehension

    That being said, I have worked at a company who uses Elixir 4 years now and I have never once written one.

    • cosmicrose@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Oh you’re so right, I never use those so I completely forgot :X

Programming

programming

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 98 users / day
  • 1.07K users / week
  • 2.96K users / month
  • 7.18K users / 6 months
  • 2.71K local subscribers
  • 20.1K subscribers
  • 2.17K Posts
  • 34.9K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • MaungaHikoi@lemmy.nz
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org