Skip to main content

Questions tagged [lambda]

Use this tag if you would like to discuss the appropriateness of a lambda (anonymous) function in your code.

Filter by
Sorted by
Tagged with
3 votes
1 answer
83 views

Adding Lambda to Path

Previously I wrote a very generic HTTP handler. But in real life the server needs to be able to handle different functions on different paths. i.e. /rest/addUser ...
Loki Astari's user avatar
  • 97.5k
5 votes
0 answers
71 views

Excel Lambdas for Filtration Lookup

Background I have an ongoing challenge in Excel, where I must match differing descriptions of the same object. Originally, there were only two alternatives: Use a dropdown list in Excel, which pulls ...
Greg's user avatar
  • 511
2 votes
0 answers
37 views

A recursive_replace_copy_if Template Function with Unwrap Level Implementation in C++

This is a follow-up question for A recursive_replace_copy_if Template Function Implementation in C++. I am trying to implement recursive_replace_copy_if template ...
JimmyHu's user avatar
  • 7,014
3 votes
1 answer
110 views

In Java, replace for loop with condition with lambdas [closed]

I want to replace a for loop with a break/return condition inside with a lambda. I think I have a good replacement, but I want ...
Oscar Besga Panel's user avatar
1 vote
1 answer
117 views

Find Method Implementation for Multidimensional Array in C#

I found that Array.Find(T[], Predicate) Method is only support one dimensional array. I am trying to generalize it to multi-dimensional array in this post. The experimental implementation The ...
JimmyHu's user avatar
  • 7,014
3 votes
1 answer
113 views

Portable lambda emulation in C

For fun I decided to try to emulate lambda functions in plain old C. It turns out it can be easily done with a bit of macro abuse. CLambda struct stores function ...
KlemenPl's user avatar
  • 225
2 votes
2 answers
112 views

Find all line numbers of prefix duplicates with streams

All line indices of lines from a text that begin with the same line prefix should be found. The prefixes and the corresponding line numbers should be returned. Streams and lambdas should be used as ...
Tobias Grothe's user avatar
3 votes
2 answers
195 views

Add offset to all filenames

From all the files in a directory, the method shiftFilenamesOffset is to increment the numeric part (int) of the alphanumeric filename by offset each time, and ...
Tobias Grothe's user avatar
2 votes
1 answer
77 views

Lazy evaluation vs strict one applied to fib

I have this OCaml problem: Recall the polymorphic type lazy seen in class, the function delay which transforms a ...
V_head's user avatar
  • 555
4 votes
0 answers
94 views

Print columns of text without hard coding the width (attempt 5)

If you'd like to print this: ...
candied_orange's user avatar
0 votes
3 answers
267 views

Print columns of text without hard coding the width (attempt 4)

If you'd like to print this: One Two Three Four 1 2 3 4 using this: ...
candied_orange's user avatar
4 votes
1 answer
280 views

Print columns of text without hard coding the width (attempt 2)

If you'd like to print this: One Two Three Four 1 2 3 4 using this: ...
candied_orange's user avatar
4 votes
2 answers
546 views

2D Matrix in C++

I wanted to play with a two-dimensional generic data container in C++ and explore different methods of traversals: using closures and iterators. I'd like a review of it. ...
nowox's user avatar
  • 1,131
3 votes
1 answer
228 views

Finger Exercise: Update book cipher by creating new book

I'm working my way through the finger exercises in John Guttag's book Introduction to Python Programming, third edition. The following finger exercise on page 143 describes encryption/decryption with ...
Wolric's user avatar
  • 133
0 votes
1 answer
585 views

Compute the goals scored by football teams in their matches in a season, from json data

Please look at the Java Stream methods in the for each loop. This method totals the score for when the your desired team is playing during the football season - input param teamKey - it is either ...
user2102346's user avatar

15 30 50 per page
1
2 3 4 5
15