C++ 编码库 FunctionalPlus

码农软件 · 软件分类 · C/C++开发工具 · 2019-11-09 21:59:48

软件介绍

FunctionalPlus 是一个小的表头库,它可以降低代码噪声,一次只处理一个单一等级的的抽象对象。通过增加你的代码的简洁性和可维护性来提高生产效率和编码乐趣。从长远的角度来看,它可以通过提供易于使用的功能将你从实现控制的流中解放出来。

示例代码:

#include "FunctionalPlus/FunctionalPlus.h"#include <iostream>
// std::list<std::uint64_t> CollatzSeq(std::uint64_t x) { ... }int main()
{    using namespace FunctionalPlus;
    using namespace std;

    typedef list<uint64_t> Ints;    
    // [1, 2, 3 ... 29]
    auto numbers = GenerateIntegralRange<Ints>(1, 30);    
    // A function that does [1, 2, 3, 4, 5] -> "[1 => 2 => 3 => 4 => 5]"
    auto ShowInts = Bind1of2(ShowContWith<Ints>, " => ");    
    // A composed function that calculates a Collatz sequence and shows it.
    auto ShowCollatsSeq = Compose(CollatzSeq, ShowInts);    
    // Apply it to all our numbers.
    auto seqStrs = Transform(ShowCollatsSeq, numbers);    
    // Combine the numbers and their sequence representations into a map.
    auto collatzDict = CreateMap(numbers, seqStrs);    
    // Print some of the sequences.
    cout << collatzDict[13] << endl;
    cout << collatzDict[17] << endl;
}

本文地址:https://codercto.com/soft/d/18644.html

大话数据结构

大话数据结构

程杰 / 清华大学出版社 / 2011-6 / 59.00元

本书为超级畅销书《大话设计模式》作者程杰潜心三年推出的扛鼎之作!以一个计算机教师教学为场景,讲解数据结构和相关算法的知识。通篇以一种趣味方式来叙述,大量引用了各种各样的生活知识来类比,并充分运用图形语言来体现抽象内容,对数据结构所涉及到的一些经典算法做到逐行分析、多算法比较。与市场上的同类数据结构图书相比,本书内容趣味易读,算法讲解细致深刻,是一本非常适合自学的读物。 本书以一个计算机教师教......一起来看看 《大话数据结构》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具