functional-swift icon indicating copy to clipboard operation
functional-swift copied to clipboard

Page 27: Sample code has `subtract` function, but text talks about `difference` function

Open mlecoz opened this issue 6 years ago • 1 comments

mlecoz avatar Aug 18 '19 19:08 mlecoz

This seems to be on page 22 of Functional Swift 2020-03-26.pdf

excerpt below: Instead of the free functions operating on our original Region type, we could then define similar methods as extensions to this struct. And instead of assembling complex regions by passing them to functions, we could then repeatedly transform a region by calling these methods: rangeRegion.shift(ownPosition).difference(friendlyRegion)

in the last line .difference should be .subtract

great book btw. 🙏🏼

andybezaire avatar Dec 28 '21 07:12 andybezaire