E is an actively used programming language created in 1997.

22Years Old 1,025Users 0Jobs

Example code from the web:

def factorial(n :int) :int {
  if (n == 1) {
    return 1
  } else if (n > 0) {
    return n * factorial(n-1)
  } else {
    throw("invalid argument to factorial: "+n)
  }
}

Example code from Linguist:

# E snippet from
# http://wiki.erights.org/wiki/Walnut/Distributed_Computing/Promises
when (tempVow) -> {
    #...use tempVow
} catch prob {
    #.... report problem
} finally {
    #....log event
}

Example code from Wikipedia:

def makeMint(name) :any {
   def [sealer, unsealer] := makeBrandPair(name)
   def mint {
     to makePurse(var balance :(int >= 0)) :any {
       def decr(amount :(0..balance)) :void {
         balance -= amount
       }
       def purse {
         to getBalance() :int { return balance }
         to sprout() :any { return mint.makePurse(0) }
         to getDecr() :any { return sealer.seal(decr) }
         to deposit(amount :int, src) :void {
           unsealer.unseal(src.getDecr())(amount)
           balance += amount
         }
       }
       return purse
     }
   }
   return mint
 }
Edit

Last updated February 11th, 2019