You are on page 1of 2

Literate Programming

Table of Contents
1. Literate programming
1.1. when within code block: org-edit-src-code
1.2. https://wiki.haskell.org/Literate_programming
1.3. https://www.offerzen.com/blog/literate-programming-empower-your-writing-with-emacs-
org-mode

1 Literate programming
1.1 when within code block: org-edit-src-code

https://robmoss.github.io/2018/02/19/Live-coding-Emacs-and-ghci

1.2 https://wiki.haskell.org/Literate_programming

1.3 https://www.offerzen.com/blog/literate-programming-empower-your-writing-with-
emacs-org-mode

Name Mark
Alice 79
Bob 19
Claire 50
Dave 49
Eve 87
Frank 73

function isPass(student) {
var name = student[0];
var mark = student[1];
return mark >= requiredMark(name);
}
function requiredMark(name) {
return 50 + name.length * 5;
}

function isPass(student) {
var name = student[0];
var mark = student[1];
return mark >= requiredMark(name);
}
function requiredMark(name) {
return 50 + name.length * 5;
}

return students.map(function(student) {
var name = student[0];
var pass = isPass(student) ? 'Passed' : 'Failed';
return [
name,
pass
];
});

console.log(students)

Created: 2019-09-19 Thu 15:02


Validate

You might also like