Relative Content

Tag Archive for lambda

What can procs and lambdas do that functions can’t in ruby

I’ve been working in Ruby for the last couple weeks, and I’ve come to the subject of procs, lambdas and blocks. After reading a fair share of examples from a variety of sources, I don’t how they’re much different from small, specialized functions. It’s entirely possible that the examples I’ve read aren’t showing the power behind procs and lambdas.

C++11 support for higher-order list functions

Most functional programming languages (e.g. Common Lisp, Scheme / Racket, Clojure, Haskell, Scala, Ocaml, SML) support some common higher-order functions on lists, such as map, filter, takeWhile, dropWhile, foldl, foldr (see e.g. Common Lisp, Scheme / Racket, Clojure side-by-side reference sheet, the Haskell, Scala, OCaml, and the SML documentation.)

Type inference in Java 8

Is the introduction of the new lambda notation (see e.g. this article) in Java 8 going to require some kind of type inference?

Is python lambda “really formal” λ-calculus or just share the name?

Now and then I use the Python lambda. Is it so formal that it is safe to say that you can do formal lambda calculus with it? I just used it but I didn’t fully understand whether the python lambda and the lambda calculus like I read was done by Alonzo Church. I also used it in Javascript, I think. Isn’t this more common in functional languages (e.g. Haskell, Scheme/Lisp, Clojure…) and I never saw lambda in use with Java or C(++)?