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.

3votes
1answer
83views

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
5votes
0answers
69views

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
  • 521
2votes
0answers
37views

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,080
3votes
1answer
101views

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
1vote
1answer
107views

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,080
3votes
1answer
107views

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
2votes
2answers
111views

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
3votes
2answers
194views

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
2votes
1answer
74views

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
4votes
0answers
91views

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

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

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
4votes
1answer
276views

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
4votes
2answers
545views

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
3votes
1answer
221views

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
0votes
1answer
581views

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

153050per page
close