<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Windymelt</author_name>
  <author_url>https://blog.hatena.ne.jp/Windymelt/</author_url>
  <blog_title>Lambdaカクテル</blog_title>
  <blog_url>https://blog.3qe.us/</blog_url>
  <categories>
    <anon>scala</anon>
    <anon>implicit-def</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>ある型Baseを引数に取るようなコンテクストで他の型のインスタンスを使おうとすると、当然、通常ならばコンパイラがエラーを吐く。 //example class DrinkContent(receipt: String) { val receiptVal = receipt def drink = {System.out.println(receiptVal)} } class PetBottle(content: DrinkContent) { var contentVal = content } REPL&gt; new DrinkContent(&quot;Orange&quot;) .drink // &quot;Oran…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.3qe.us%2Fentry%2F20130203%2F1359914132&quot; title=&quot;implicit defでインスタンスを変換する - Lambdaカクテル&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-02-03 02:55:32</published>
  <title>implicit defでインスタンスを変換する</title>
  <type>rich</type>
  <url>https://blog.3qe.us/entry/20130203/1359914132</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
