Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 734 Bytes

README.md

File metadata and controls

40 lines (32 loc) · 734 Bytes

pandoc codeblock filters

This is an example of Pandoc filters and loginteractive for logging interactive programs as if they where executed from a terminal.

Octave

A = reshape(1:4,[2 2])
v = eig(A)

Python

def isPrime(n):
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            return False
    return True

isPrime(2)
isPrime(4)
for n in range(2,100):
    if isPrime(n):
        print n,

Ruby

def factorial(n)
return 1 if n <= 1
return n * factorial(n - 1)
end
factorial(20)