Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import
- language
- .
- {
- existentials
- ,
- higherKinds
- ,
- implicitConversions
- }
- object
- Hello
- extends
- App
- {
- trait
- Arg
- [
- +
- A
- ]
- <:
- Any
- {
- self
- :
- Run
- .
- type
- =>
- type
- Q
- [
- +
- A
- ]
- <:
- A
- }
- object
- Run
- extends
- Arg
- [
- Arg
- [
- Hello
- .
- type
- ]
- #
- Q
- [
- this
- .
- type
- ]
- ]
- implicit
- def
- convert
- (
- a
- :
- Any
- )
- :
- Nothing
- =
- a
- .
- asInstanceOf
- implicit
- val
- put
- =
- (
- a
- :
- Any
- with
- Arg
- [
- _
- ]
- #
- Q
- [
- String
- ]
- )
- =>
- println(
- a
- )
- implicit
- val
- hello
- :
- Any
- with
- Arg
- [
- _
- ]
- #
- Q
- [
- String
- ]
- =
- "hello world"
- .
- asInstanceOf
- [
- Any
- with
- Arg
- [
- _
- ]
- #
- Q
- [
- String
- ]
- ]
- implicit
- def
- run
- (
- implicit
- f
- :
- Any
- with
- Arg
- [
- _
- ]
- #
- Q
- [
- String
- ]
- =>
- Unit
- ,
- a
- :
- Any
- with
- Arg
- [
- _
- ]
- #
- Q
- [
- String
- ]
- )
- :
- Run
- .
- type
- =
- {
- f(
- a
- )
- Run
- }
- implicitly
- [
- Run
- .
- type
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement