This file contains 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
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3. | |
#![feature(ordering_chaining, step_by)] | |
fn main() { | |
// linq5: Where - Indexed | |
/* | |
//c# | |
public void Linq5() | |
{ |
This file contains 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
//Addapted from this page http://lostechies.com/derickbailey/2012/10/07/javascript-mixins-beyond-simple-object-extension/ | |
module Mixer { | |
// build a mixin function to take a target that receives the mixin, | |
// a source that is the mixin, and a list of methods / attributes to | |
// copy over to the target | |
export function mix(target, source, methodNames){ | |
// ignore the actual args list and build from arguments so we can | |
// be sure to get all of the method names |