Skip to content

Instantly share code, notes, and snippets.

@x10an14
Created January 25, 2022 12:40
Show Gist options
  • Save x10an14/bc950f4e8bdd66fa986b3500933eaefd to your computer and use it in GitHub Desktop.
Save x10an14/bc950f4e8bdd66fa986b3500933eaefd to your computer and use it in GitHub Desktop.
Forskjell på filosofi
liste_tall = [1, 2, 3, 4, 5, 6]
def summere_imperativt(liste):
sum = 0
for tall in liste:
sum += sum
return sum
def summere_deklarativt(liste):
sum = reduce(x + y, liste)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment