Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

exampleBasedProgramming

Toying with example based programming.

Introduction to learners

Learners are a new kind of function. Instead of describing code logic, you describe expected use cases ('rules') and the learners learn how to resolve it.

Examples

A learner that take 2 variables in parameters and add them with a space

learner addSpaceBeetweenWords() {
  ("hello", "world") => "hello world";
}

A learner that extract a date from a timestamp

learner yearFromTimeStamp() {
  (1435326791790) => 2015;
  (1435295687790) => 2014;
}

A learner that remove odd numbers from array

learner removeOddNumber() {
  ([0,1,2,3,4,5,6,7,8,9]) => [0,2,4,6,8];
}

What is this project?

This project is an experiment :) Not sure it will ever work.

About

Toying with example based programming.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors