Search code examples
programming-languagessample

Short code samples, solving interesting problems (in multiple languages)


recently I've found an interesting sample "spell checker in 21 lines of code" by head of Google research department - Peter Norvig http://www.norvig.com/spell-correct.html

Although it's an very interesting stuff by itself, it's also interesting to see how the same problem are solved in different languages!

Do You know more of such samples (solved in multiple languages)? Please post link here.


Solution

  • Have look at PLEAC the same problems solved in numerous languages.

    Currently these languages are included:

    • perl
    • groovy
    • ocaml
    • python
    • ruby
    • guile
    • commonlisp
    • rexx
    • tcl
    • pike
    • php
    • haskell
    • merd
    • picolisp
    • ada
    • haskell-on-steroids
    • java
    • cposix
    • pliant
    • c++
    • factor
    • smalltalk
    • forth
    • erlang
    • R
    • objective-c
    • masd
    • bash
    • nasm
    • go