Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
Process: stable [77407]
Path: /Applications/Warp.app/Contents/MacOS/stable
Load Address: 0x104d84000
Identifier: dev.warp.Warp-Stable
Version: 0.1.0 (20220808.095308)
Code Type: ARM64
Platform: macOS
Parent Process: launchd [1]
Date/Time: 2022-08-17 15:50:07.325 +0200
ignored_files = [
"lib/tetris/shape.ex"
]
[
inputs:
Enum.flat_map(
["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
&Path.wildcard(&1, match_dot: true)
) -- ignored_files
inputs:
["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
inputs:
Enum.flat_map(["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
& Path.wildcard(&1, match_dot: true)) -- ["lib/foo/bar.ex"]
def shape(%Tetris.Brick{name: :l}) do
[
{2, 1},
{2, 2},
{2, 3},
{3, 3}
]
end
def shape(%Tetris.Brick{name: :l}) do
[
{2, 1},
{2, 2},
{2, 3}, {3,3}
]
end
defmodule Composition do
def inc(x) do
x + 1
end
def square(x) do
x * x
end
def double(x) do
@eqr
eqr / Program.cs
Last active July 24, 2019 17:03
array iteration
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp1
{
using System.Diagnostics;
using System.Threading.Tasks;
@eqr
eqr / example2.cs
Created February 17, 2018 22:01
Grid.NET adding/removing
var cache = CacheFactory.CreateCache(Person.CreateTestData());
cache.AddIndexer(new Indexer<Person, string>(p => p.Name));
cache.AddItems(new Person("Jane", "Dow", new DateTime()), new Person("Jill", "Jungle", new DateTime()));
@eqr
eqr / example1.cs
Last active February 17, 2018 22:17
Gird.NET example
List<Person> persons = GetAllPersons();
var cache = CacheFactory.CreateCache(persons);
cache.AddIndexer(new Indexer<Person, string>(p => p.Name));
// Returns all persons with name Jane
var janes = cache.Get(p => p.Name, "Jane").ToList();
cache.AddIndexer(new Indexer<Person, string>(p => p.LastName));
// Returns all persons with last name Smith
var smiths = cache.Get(p => p.LastName, "Smith").ToList();