Latest 0.1.0
Homepage https://github.com/k06a/Linqwift
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
Version
License
Platform

Just imagine the power of LINQ on iOS and OS X platforms.

Main objective is to implement all of these methods:
http://msdn.microsoft.com/en-us/library/system.linq.enumerable_methods.aspx

Implemented Features

Main Methods

func Where(predicate: (T)->Bool) -> AnySequence<T>
func Where(predicate: (T,Int)->Bool) -> AnySequence<T>
func Select<U>(transform: (T)->U) -> AnySequence<U>
func Select<U>(transform: (T,Int)->U) -> AnySequence<U>
func Distinct<U where U: Hashable>(transform: (T)->U) -> AnySequence<T>
func Skip(count: Int) -> AnySequence<T>
func SkipWhile(predicate: (T)->Bool) -> AnySequence<T>
func Take(count: Int) -> AnySequence<T>
func TakeWhile(predicate: (T)->Bool) -> AnySequence<T>

Aggregators

func Aggregate<U>(block: (U,T)->U, startValue: U) -> U
func Elect(electLeft: (T,T)->Bool) -> (value: T?, index: Int?)
func First(predicate: (T)->Bool) -> (value: T?, index: Int?)
func Last(predicate: (T)->Bool) -> (value: T?, index: Int?)
func Min<U: Comparable>(transform: (T)->U) -> (transformed: U?, value: T?, index: Int?)
func Max<U: Comparable>(transform: (T)->U) -> (transformed: U?, value: T?, index: Int?)

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Linqwift is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Linqwift'

Author

Anton Bukov, [email protected]

License

Linqwift is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Linqwift",
    "version": "0.1.0",
    "summary": "Swift language LINQ extension",
    "description": "Just imagine the power of LINQ on iOS and OS X platforms. nMain objective is to implement all of these methods:nhttp://msdn.microsoft.com/en-us/library/system.linq.enumerable_methods.aspx",
    "homepage": "https://github.com/k06a/Linqwift",
    "license": "MIT",
    "authors": {
        "Anton Bukov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/k06a/Linqwift.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/k06a",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*"
}

Pin It on Pinterest

Share This