Wei Lin Ngo - @Creastery (Praetorian)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script> | |
<script type="text/javascript" src="shopicruit.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `partition/2` splits a list into smaller lists of a given size, using recursion! | |
# | |
# usage: | |
# list = [:one, :two, :three, :four, :five] | |
# partition(list, 2) | |
# > [[:one, :two], [:three, :four], [:five]] | |
def partition(list, partition_size) | |
when is_list(list) | |
and is_integer(partition_size) |