Skip to content

Instantly share code, notes, and snippets.

View jamesona's full-sized avatar

Jameson Aranda jamesona

View GitHub Profile
<html>
<style>
html, body {
margin: 0;
padding: 0;
background: #ccc;
font-family: sans-serif;
}
h1, #input {
function one() {console.log('one')} // named function
one();
new Array([0]).forEach(function() {console.log('two')}) // anonymous function
const three = function() {console.log('three')}; // aliased anonymous function
three();
const container = {
four: function() {console.log('four')}, // aliased anonymous function
@jamesona
jamesona / recur_even_odd_list_split.py
Last active November 24, 2020 00:10 — forked from elkym/recur_even_odd_list_split.py
Python-thing-recursion-wonderings.py
l1 = [1,3,9,10,4,3,2,5,17,14,11]
def splitIt(x):
'''
This recursive function takes a list of positive integers
x as argument and returns a tuple of two lists: a list of the even integers
in x followed by a list of the odd integers in x.
E.g. x = [3,2,1,5,4,6] gives [1,3,5] [2,4,6]
x = [1,3,9] gives [1,3,9] []