This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.
import scala.language.higherKinds | |
/* | |
Mainline Profunctor Heirarchy for Optics: https://r6research.livejournal.com/27476.html | |
Profunctor Optics: The Categorical Approach - Bartosz Milewski: https://www.youtube.com/watch?v=l1FCXUi6Vlw | |
*/ | |
object ProfunctorOpticsSimpleImpl { | |
trait Functor[F[_]] { | |
def map[A, B](x: F[A])(f: A => B): F[B] |
/// A type equality guarantee is capable of safely casting one value to a | |
/// different type. It can only be created when `S` and `T` are statically known | |
/// to be equal. | |
struct TypeEqualityGuarantee<S, T> { | |
private init() {} | |
/// Safely cast a value to the other type. | |
func cast(_ value: T) -> S { | |
return value as! S | |
} |
# lib/decent_exposure/draper_strong_parameters_strategy.rb: | |
class DraperStrongParametersStrategy < DecentExposure::StrongParametersStrategy | |
def resource | |
super.decorate | |
end | |
end | |
# app/controllers/articles.rb |
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |