Skip to main content

Questions tagged [pattern-matching]

Finding sequences of data that have a particular structure or matching specific criteria or rules. For character pattern defined by a regular expression, use the tag regular-expressions instead.

2 votes
5 answers
3k views

In an HTTP application, I think about routing requests based not only on the path, but also based on the request body. For an example, think about the following two different body schemas for a PUT ...
Jonathan Herrera's user avatar
0 votes
1 answer
89 views

C#10 Has extended the property pattern ability, I think it began since #7 EG: { Car: { Interior: pattern } } Meaning you can do some nice pattern matching even in if statements if (car_var is ...
Pogrindis's user avatar
  • 109
2 votes
2 answers
3k views

I'm developing backend for a dating app, in which each user has a profile of his/her characteristics a profile of ideal match's characteristics There are dozens of characteristics like gender, ...
Babr's user avatar
  • 139
1 vote
1 answer
63 views

I'm retrieving values from 3 tables in database and trying to make them match. I was wondering how I could manage cache in an elegant way. I can't change the database structure even though one of the ...
FooBar's user avatar
  • 13
0 votes
1 answer
271 views

I have two lists: 1: 1) A abc 2) A def 3) A ghi 4) B jkl 5) B mno 6) C fzy 7) C xxa 2: 1) vsf 2) jkl 3) fzy 4) xxa 5) xyz 6) mno 7) def 8) abc I am trying to match each of the continuous sequences ...
sigil's user avatar
  • 363
5 votes
2 answers
1k views

I have written a simple class hierarchy to represent terms in Scala. Terms are recursive data types, e.g., a Sum and a Multiplication consist of the left-hand-side (lhs), which is a Term, and the ...
helios35's user avatar
  • 159
6 votes
3 answers
3k views

I understand that there is a thread discussing a similar issue here: How to efficiently search a set of vectors for a vector which is the closest match But my problem is slightly different - and ...
Ziqi's user avatar
  • 163
2 votes
1 answer
128 views

Let's say I'm programming a chess game. At some point I have to check, which moves are valid for a given piece. What would be the proper way to select the correct pathfinding function for a given ...
user avatar

15 30 50 per page