Lambdas


Lambdas

  • named after lambda calculus, developed by Alonzo Church in 1936
scientists = [
    'Marie Curie',
    'Albert Einstein',
    'Niels Bohr',
    'Isaac Newton',
    'Dmitri Mendeleev',
    'Antoine Lavoisier',
    'Carl Linnaeus',
    'Alfred Wegener',
    'Charles Darwin'
]

sorted(scientists, key=lambda scientist_name: scientist_name.split()[-1])

function vs lambda

Made with Gatsby G Logo