This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Janusz do | |
def homework() do | |
1..7 | |
|> Enum.map(fn _ -> :rand.uniform * 10 |> round() end) | |
|> IO.inspect() | |
|> Enum.count(fn x -> x > 5 end) | |
|> Kernel.>(3) | |
|> case do | |
true -> "Więcej" | |
false -> "Mniej" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Find ghosts to place. Then find buildings to destruct. | |
function runOnce() | |
global.runOnce = true | |
if not global.blueBuildFirstTick then | |
global.blueBuildFirstTick = {} | |
end | |
if not global.bluePositions then | |
global.bluePosition = {} | |
end | |
if not global.blueBuildToggle then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (..) | |
run : String | |
run = | |
let | |
add3 = List.foldl (>>) (\x -> x) [add1, add1, add1] | |
in | |
add3 10 | |
|> toString | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AlgebraicEffects exposing (..) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations": { | |
"activityBarBadge.background": "#2979FF", | |
"list.activeSelectionForeground": "#2979FF", | |
"list.inactiveSelectionForeground": "#2979FF", | |
"list.highlightForeground": "#2979FF", | |
"scrollbarSlider.activeBackground": "#2979FF50", | |
"editorSuggestWidget.highlightForeground": "#2979FF", | |
"textLink.foreground": "#2979FF", | |
"progressBar.background": "#2979FF", | |
"pickerGroup.foreground": "#2979FF", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule USPDistributorWeb.OrderController do | |
use USPDistributorWeb, :controller | |
alias USPDistributor.Orders | |
alias USPDistributor.Orders.Order | |
action_fallback USPDistributorWeb.FallbackController | |
plug Guardian.Permissions.Bitwise, [ensure: %{admin: [:list_orders]}] when action in [:index] | |
plug Guardian.Permissions.Bitwise, [ensure: %{order: [:create]}] when action in [:create] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ElchemyDeps do | |
def init(project, {__MODULE, _}) do | |
# We don't need additional elixirc paths, and elchemy paths should be | |
# configurable by the user (and there already is a default value) | |
project | |
|> put_in(:compilers, [:elchemy | (project[:compilers] || [])]) | |
|> put_in(:deps, project[:deps] ++ deps()) | |
end | |
def deps do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Elchemy.Platoform.Eff exposing (..) | |
type alias IO eff = | |
{ getEmpty : () -> eff | |
, reduce : List (eff -> eff) | |
} | |
type Eff x y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SingletonIncrementer exposing (..) | |
{-| Experiment on implementing type-safe OTP compliant GenServer | |
-} | |
import Platform exposing (Task(..)) | |
import Task | |
import Time | |
NewerOlder