资源算法transducers-ruby

transducers-ruby

2020-01-18 | |  43 |   0 |   0

transducers-ruby

Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the essence of the transformation in terms of an individual element. Because transducers are decoupled from input or output sources, they can be used in many different processes - collections, streams, channels, observables, etc. Transducers compose directly, without awareness of input or creation of intermediate aggregates.

Also see the introductoryblog postand this video.

transducers-ruby is brought to you by Cognitect Labs.

Installation

gem install transducers

Documentation

http://rubydoc.info/gems/transducers/frames/

Usage

require 'transducers'T = TransducersT.transduce(T.compose(T.map(:succ), T.filter(:even?)), :<<, [], 0..9)# => [2, 4, 6, 8, 10]

See the documentation for more detail.

Contributing

This library is open source, developed internally by Cognitect. Issues can be filed using GitHub Issues.

This project is provided without support or guarantee of continued development. Because transducers-ruby may be incorporated into products or client projects, we prefer to do development internally and do not accept pull requests or patches.

Copyright and License

Copyright © 2014 Cognitect

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


上一篇:Transducers.jl

下一篇:transducers-python

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...