Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenses:可组合函数式编程的 Getter 和 Setter #4961

Merged
merged 4 commits into from
Jan 14, 2019

Conversation

EmilyQiRabbit
Copy link
Contributor

译文翻译完成,resolve #4927

@EmilyQiRabbit EmilyQiRabbit changed the title Update lenses-composable-getters-and-setterssfor-functional-programmi… Lenses:可组合函数式编程的 Getter 和 Setter Jan 8, 2019
@leviding leviding added the 前端 label Jan 8, 2019
@Moonliujk
Copy link

@EmilyQiRabbit @leviding 校对认领

@fanyijihua
Copy link
Collaborator

@Moonliujk 好的呢 🍺

Copy link

@Moonliujk Moonliujk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译的很好,指出了一些小错误。希望译者注意一下


> **Note:** This is part of the [**“Composing Software” book**](https://leanpub.com/composingsoftware) that started life right here as a blog post series. It covers functional programming and compositional software techniques in JavaScript (ES6+) from the ground up.
> [_< Previous_](https://github.com/xitu/gold-miner/blob/master/TODO1/transducers-efficient-data-processing-pipelines-in-javascript.md) _|_ [_<< Start over at Part 1_](https://juejin.im/post/5c0dd214518825444758453a)
> **注意:**本篇是[**“Composing Software” 这本书**](https://leanpub.com/composingsoftware)的一部分,它将以系列博客的形式展开新生。它涵盖了 JavaScript(ES6+)函数式编程和可组合软件技术的最基础的知识。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composing Software 非专有名词,需要翻译出来


Imagine you have a tuple array representing a point’s `x`, `y`, and `z` coordinates:
假设你有一个元组数组(tuple array),代表了一个包含 `x``y` `z`三点的坐标:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z 后添加空格

1. `view(lens, set(lens, a, store)) ≡ a` — If you set a value into the store, and immediately view the value through the lens, you get the value that was set.
2. `set(lens, b, set(lens, a, store)) ≡ set(lens, b, store)` — If you set a lens value to `a` and then immediately set the lens value to `b`, it's the same as if you'd just set the value to `b`.
3. `set(lens, view(lens, store), store) ≡ store` — If you get the lens value from the store, and then immediately set that value back into the store, the value is unchanged.
1. `view(lens, set(lens, a, store)) ≡ a` -- 如果你将一组值设置到一个 store 里,并且马上通过 lens 看到了值,你将能获取到这个被设置的值。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--
=》
——
下同

@@ -168,9 +167,9 @@ const store = fooStore;
}
```

### Composing Lenses
### 编写 Lenses

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

编写 Lenses
=》
组合 Lenses
composing 这里应该翻译为 组合


* * *

**_Eric Elliott_** _is a distributed systems expert and author of the books,_ [_“Composing Software”_](https://leanpub.com/composingsoftware) _and_ [_“Programming JavaScript Applications”_](https://ericelliottjs.com/product/programming-javascript-applications-ebook/)_. As co-founder of_ [_DevAnywhere.io_](https://devanywhere.io/)_, he teaches developers the skills they need to work remotely and embrace work/life balance. He builds and advises development teams for crypto projects, and has contributed to software experiences for_ **_Adobe Systems,_** **_Zumba Fitness,_** **_The Wall Street Journal,_** **_ESPN,_** **_BBC,_** _and top recording artists including_ **_Usher, Frank Ocean, Metallica,_** _and many more._
**Eric Elliott** 是一名分布式系统专家,也是书籍 [“Composing Software”](https://leanpub.com/composingsoftware) 和 [“Programming JavaScript Applications”](https://ericelliottjs.com/product/programming-javascript-applications-ebook/) 的作者。作为 [DevAnywhere.io](https://devanywhere.io/) 的合作创始人,他教给开发人员远程工作的技能,并鼓励他们找到工作和生活的平衡。他构建加密项目并鼓励开发团队使用它,并且为 **Adobe Systems,****Zumba Fitness,****The Wall Street Journal,****ESPN,****BBC,**和包括 **Usher,Frank OceanMetallica 等很多顶级音乐艺术家** 等等提供开发经验。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样,在这里,我觉得书名需要翻译出来

@Moonliujk
Copy link

@EmilyQiRabbit @leviding 校对完毕

@leviding leviding added the enhancement 等待译者修改 label Jan 11, 2019
@leviding
Copy link
Member

@EmilyQiRabbit 可以修改啦

@EmilyQiRabbit
Copy link
Contributor Author

@Moonliujk 感谢帮忙校对~

@leviding
Copy link
Member

@EmilyQiRabbit 可以修改啦

Copy link
Member

@leviding leviding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Moonliujk 校对的很赞
@EmilyQiRabbit 翻译辛苦了

@leviding leviding merged commit 4fa57e2 into xitu:master Jan 14, 2019
@leviding leviding added 翻译完成 and removed 标注 待管理员 Review 正在校对 labels Jan 14, 2019
@leviding
Copy link
Member

这篇我发布吧

@EmilyQiRabbit
Copy link
Contributor Author

@leviding 感谢~

@EmilyQiRabbit EmilyQiRabbit deleted the translation/Lenses branch June 19, 2019 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lenses:可组合函数式编程的 Getter 和 Setter
4 participants