-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Add the following two refactorings:
Abstract
viewButton active config_ =
Button.button
[ Button.onClick
(config_.tagger
(ToggleResponsiveMenu
(if active then
DefaultState
else
QuickFilters
)
)
)
running Abstract while selecting lines 5-11 :
viewButton active config_ =
Button.button
[ Button.onClick
(config_.tagger (myFunction active))
$0myFunction $1active =
(ToggleResponsiveMenu
(if active then
DefaultState
else
QuickFilters
)
)
with tabstops indicated by $0, $1.
Should work at the type level:
type Foo
= Foo { val : Int, name : String }
| Bar Int
Activating while selecting the record:
type Foo
= Foo MyRecod
| Bar Int
type alias $0MyRecord =
{ val : Int, name : String }
Un-abstract is conceptually the reverse:
type alias Strings = List String
myFun : Strings -> String
myFun = String.join ", "
Running on Strings
produces:
myFun : List String -> String
myFun = String.join ", "
Metadata
Metadata
Assignees
Labels
No labels