Tags » Pattern Matching

Pattern Matching & unapply & apply

In Scala, we use pattern matching very often. It’s made by unapply. But because we use this by making case class, I always forget how to make it. 498 more words


The top that nearly didn't happen

All the credit for this top rightfully goes to Jon.

I was clearing out my fabric about 6 months ago and this fabric was added to the Chuck It Out pile (it got to a grand total of 10 pieces of fabric out of a stash of nearly 200 that I didn’t actually want.) About 2 months later, we did actually come to chucking it out, we had had ambitious plans about selling stuff on Facebook sales communities, but in the end what was chucked out was so little and all the shit quality stuff, that there didn’t seem much point doing anything with it but sending it to the recycling bin. 467 more words


Implementing Nat in Rust (a la Haskell)

The power of Algebraic Data Types comes to the fore when dealing with complex problem domains. Most modern languages tend towards supporting some form of ADTs, but the complexity of expressing such paradigms is not completely lost when compared to languages that were designed with such support in mind. 639 more words

Redemption of the Dressmaking Kind

After making a dress for one of my daughters where the pattern matched everywhere but on the back and my suggestion that she walk backwards all the time fell on deaf ears, I got a bit dispirited.   1,028 more words

Arts And Crafts

Abolishing Switch-Case Statement and Pattern Matching in C# 7.0

There are many arguments on the web regarding the switch-case statement. It seems that half of the programmers think that switch-case statement is actually an anti-pattern, and other half claims there are in fact use cases for this concept. 1,661 more words

Software Development

A Backwards Step

I’m in the dressmaking doldrums at the moment  despite having several patterns I want to make and the fabric to make them with.  So, just to get my hand back in I thought I’d run up a quick dress on the overlocker for my daughter.   204 more words

Arts And Crafts