Imagine we have a reducer to control a list of items:
function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
switch(action.type) {
case 'SHOW_ALL_ITEMS':
return action.data.items
default:
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
Proxy cache passes GET instead of HEAD to upstream... so we have a 403.
This version include these fixes.
# In app/helpers/users_helper.rb | |
require_relative 'users_helper/greet' | |
module UsersHelper | |
module Internals | |
end | |
private_constant :Internals | |
include Internals |
// Sublime Text - Build System for Javascript | |
{ | |
"cmd": ["node", "$file"], | |
"selector": "source.js" | |
} |
class Wrong | |
def method_missing(m, *) | |
if m =~ /\Ahello_(.+)\z/ | |
puts "Hello, #{$1.capitalize}" | |
else | |
super | |
end | |
end | |
end |
original_solution.files.each do |original_file| | |
f = original_file.dup | |
f.remote_name_url = original_file.name.url | |
new_solution.files << f | |
end |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.