Skip to content

Commit 5f03cf2

Browse files
authored
Merge pull request #212 from codereport/dev
Rename found to any_of + lessons learned from stream #12
2 parents 8245948 + 5072c36 commit 5f03cf2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

jsrc/verbs/dyadic/take_drop.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ take_sparse(J jt, array a, array w) {
103103
for (int64_t i = 0; i < n; ++i) {
104104
// TODO: rename cc (and u, s, iv) when we know what to call them
105105
auto const cc =
106-
aal::var::found([](auto a, auto b, auto c) { return 0 > a ? c < a + b : c >= a; }, u, u + m, s, iv);
106+
aal::var::any_of([](auto a, auto b, auto c) { return 0 > a ? c < a + b : c >= a; }, u, u + m, s, iv);
107107
if (!cc) {
108108
++d;
109109
memcpy(yv, xv, k);

learning/LIVESTREAM_LESSONS.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ Prelude> let innerProduct = blackbird sum (zipWith (*))
143143
* `target_include_directories` in CMake to depend on other directory
144144
* Boost vs MIT vs Apache 2.0, all are great - went with Boost b/c of C++ ecosystem
145145

146-
### Livestream #10 2021-02-27
146+
### Livestream #11 2021-03-05
147147
* `13 :` with a verb using `x` and `y` will convert to point free form
148148
* `softMax =. [:(%+/)^`
149149
* ISO C++ Core Guidelines has 4 `for`/`while` loop guidelines, no "no raw loops"
150+
151+
### Livestream #12 2021-03-16
152+
* `` this is referred to as "lamp" because comments help illuminate your code
153+
* `std::div` & friends exist in `<cstdlib>` which are analogs of Python's `divmod`
154+
* `std::negate` exists as a function object

0 commit comments

Comments
 (0)