如何在不创建闭包的情况下调用多参数函数? [英] How to invoke a multi-argument function without creating a closure?

查看:51
本文介绍了如何在不创建闭包的情况下调用多参数函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做 2018年代码出现(第2天,第1部分) Rust中的解决方案.

I came across this while doing the 2018 Advent of Code (Day 2, Part 1) solution in Rust.

要解决的问题:

取具有完全相同的两个字母的字符串的计数,乘以具有完全相同的三个字母的字符串的计数.

Take the count of strings that have exactly two of the same letter, multiplied by the count of strings that have exactly three of the same letter.

输入

abcdega 
hihklmh 
abqasbb
aaaabcd

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆