javascript ninja: ch 3, 4, 5
functional js: 6-10
- The Little Schemer
<html> | |
<head> | |
<title>Random Tasks</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>Упражнение</h1> | |
<p class="task1">1) Интернет-СМИ своей мечты. Нарезать микс из скриншотов с сайтов Look At Media, WOS, The Verge…</p> | |
<p class="task2">2) Идея своего стартапа на готовых кнопках и менюшках<br>http://www.1stwebdesigner.com/freebies/free-flat-ui-kits/<br>google it: flat ui kit</p> |
Secrets of the JavaScript Ninja: главы 3-6
Nodeschool.io: Functional JavaScript, упражнения 1-12
Функция получает строку с названием файла, а выдает его расширение.
cube :: Float -> Float | |
cube x = x * x * x | |
sum' :: (Float -> Float) -> Float -> (Float -> Float) -> Float -> Float | |
sum' term a next b = | |
if a > b | |
then 0 | |
else term a + sum' term (next a) next b | |
integral :: (Float -> Float) -> Float -> Float -> Float -> Float |
{
"cmd": ["babel-node", "$file"],
"selector": "source.js",
"path": "/usr/local/bin:$PATH", // ENV setting for mac users
"quiet": true // get rid of annoying `[Finished in %fs]`
}
The designer and programmer who main goal is to inspire other creators.
import Data.List | |
import Data.List.Split | |
-- Exercise 1 Hopscotch | |
skips :: [a] -> [[a]] | |
skips xs = zipWith every [1..(length xs)] (repeat xs) where | |
every n xs = extractBy orderedPairs where | |
extractBy = fmap fst . filter ((== n) . snd) | |
orderedPairs = zip xs $ cycle [1..n] |